package com.lx.Login.bean;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import javax.annotation.PostConstruct;

@Data
// ConfigurationProperties 一次性加载配置文件
@ConfigurationProperties(prefix = "login")
public class LoginPropertise {
    private String userClass;

    private String userTable;

    private String usernameColumn;

    private String passwordColumn;

    private String emailColumn;

    private String encryption;

    private String sessionKey;

    private String[] loginScope;

    Class userClassObject;

    // IOC bean 装载之后
    @PostConstruct
    void myInit() throws ClassNotFoundException {
        userClassObject = Class.forName(getUserClass());
    }

}
